﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OgilvyOne.BLL;
using System.Data;
using System.Configuration;


public partial class allergy_say_MamaSay : System.Web.UI.Page
{
    protected string id;
    protected string time;
    protected string filename;
    protected string titles;
    protected string meta_kwords;
    protected string meta_desc;
    protected string DomainName;

    protected void Page_Load(object sender, EventArgs e)
    {

        Response.Redirect("../test/allergytest.aspx");
        DomainName = ConfigurationSettings.AppSettings["DomainName"];
        
        //string URL = "http://localhost/admin/allergy/mama/video/11.mpg";
        DateTime cur = new DateTime();
        //妈妈要知道
        this.doKnow_rpt.DataSource = BLLArticleInfo.selectc("5", "doKnow", "1");
        this.doKnow_rpt.DataBind();

        DataTable seodt = BLLArticleInfo.getSeoInfo("206");
        foreach (DataRow seorows in seodt.Rows)
        {
            titles = seorows["Columntitle"].ToString();
            meta_kwords = seorows["ColumnKeyword"].ToString();
            meta_desc = seorows["ColumnDesc"].ToString();
        }



        //banner 你知道吗
        this.banner_rpt.DataSource = BLLArticleInfo.selectc("isbanner", "1");
        this.banner_rpt.DataBind();
        //研究
        this.yanjiu_rpt.DataSource = BLLArticleInfo.selArticle("89");
        this.yanjiu_rpt.DataBind();
        try
        {
            id = Request.Params["id"].ToString();
        }
        catch(Exception)
        {}
        if (id==null || id=="")
        {
            DataTable dt = BLLArticleInfo.GetVideoOne();
            foreach (DataRow row in dt.Rows)
            {
                id = row["id"].ToString();
            }
        }
        DataTable dt1 = BLLArticleInfo.GetVideo(id);
        foreach (DataRow row in dt1.Rows)
        {
            time = row["creattime"].ToString();
            filename = row["fileName"].ToString();

        }
        //time = cur.ToString("f");
        this.info_rpt.DataSource = dt1;
        this.info_rpt.DataBind();

        this.videolist_rpt.DataSource = BLLArticleInfo.GetVideo();
        this.videolist_rpt.DataBind();
    }

}
